package com.ff.xyh.feign.client.post;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ff.xyh.common.entity.post.PostRoom;
import com.ff.xyh.common.entity.result.ResultMessage;
import com.ff.xyh.common.entity.result.ResultObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Auther FF
 * @Date 2022年 11月 15日
 * @Time 23:45
 */
@FeignClient(value = "service-post", contextId = "PostRoomClient")
@RequestMapping("/post-service")
public interface PostRoomClient {

    @PostMapping("get-post-room-id")
    ResultObject getPostRoomById(
            @RequestParam(name = "id") String id) ;

    @PostMapping("get-post-room-post-ids-type")
    ResultObject getPostRoomsByPostIdsAndPostType(
            @RequestParam(name = "postIds") List<String> postIds,
            @RequestParam(name = "postType") int postType) ;

    @PostMapping("get-post-room-post-id-type")
    ResultObject getPostRoomWithPostIdAndType(
            @RequestParam(name = "postId") String postId,
            @RequestParam(name = "postType") int postType) ;

    @PostMapping("get-post-rooms-user-id")
    ResultObject getPostRoomsByUserId(
            @RequestParam(name = "userId") String userId) ;

    @PostMapping("insert-post-room")
    ResultObject insertPostRoom(
            @RequestBody PostRoom postRoom) ;

    @PostMapping("delete-post-room-id")
    ResultObject deletePostRoomById(
            @RequestParam(name = "id") String id) ;
    @PostMapping("delete-post-room-id-user")
    ResultObject deletePostRoomByIdAndUserId(
            @RequestParam(name = "id") String id,
            @RequestParam(name = "userId") String userId) ;
}
